package io.geekidea.boot.salesslip.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.geekidea.boot.common.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * 销售单实体类（tb_salesslip）
 */

@Data
@TableName("tb_salesslip")
public class Salesslip extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("numbers")
    private String numbers;

    @TableField("type")
    private String type;

    @TableField("subtype")
    private String subtype;

    @TableField("materialTypeNum")
    private Integer materialTypeNum;

    @TableField("materialNum")
    private Integer materialNum;

    @TableField("status")
    private String status;

    @TableField("statusOrder")
    private String statusOrder;

    @TableField("moenyCollected")
    private Double moenyCollected;

    @TableField("indirect")
    private Double indirect;

    @TableField("paidCount")
    private Double paidCount;

    @TableField("profit")
    private Double profit;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8",shape = JsonFormat.Shape.STRING)
    @TableField("orderTime")
    private LocalDateTime orderTime;

    @TableField("creatorUser")
    private String creatorUser;
    @TableField("examineUser")
    private String examineUser;


    @TableField("areaId")
    private Integer areaId;

    @TableField("storesId")
    private Integer storesId;

    //物料详情
    @TableField("materialDetails")
    private String materialDetails;
    //合计成本价
    @TableField("costpriceCount")
    private double costpriceCount;
    //合计销售价
    @TableField("salespriceCount")
    private double salespriceCount;
    //合计间接成本
    @TableField("indirectcostsCount")
    private double indirectcostsCount;
    //应收金额
    @TableField("receivableAmount")
    private double receivableAmount;
    //优惠金额
    @TableField("discountAmount")
    private double discountAmount;
    //优惠备注
    @TableField("notes")
    private String notes;
    //收款方式
    @TableField("paymentMethod")
    private String paymentMethod;
    //客户姓名
    @TableField("customerName")
    private String customerName;
    //手机号码
    @TableField("phoneNumber")
    private String phoneNumber;
    //门店提成金额
    @TableField("commissionAmount")
    private double commissionAmount;
    //审核留言
    @TableField("examineContent")
    private String examineContent;


    @TableField(exist = false)
    private String areaName;

    @TableField(exist = false)
    private String storeName;


}
